<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fck" uri="/WEB-INF/FCKeditor.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="<%=request.getContextPath()%>/css/Style.css"
			type="text/css" rel="stylesheet">
		<link href="<%=request.getContextPath()%>/css/admin.css"
			type="text/css" rel="stylesheet">
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/select.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath() %>/FCKeditor/fckeditor.js"></script>
		<script type="text/javascript">
		window.onload = function(){
		var oFCKeditor1 = new FCKeditor("jobInfo.describ");
		var oFCKeditor2 = new FCKeditor("jobInfo.jobNeed");
		oFCKeditor1.BasePath = "<%=request.getContextPath()%>/FCKeditor/";
		oFCKeditor2.BasePath = "<%=request.getContextPath()%>/FCKeditor/";
		oFCKeditor1.ReplaceTextarea();
		oFCKeditor2.ReplaceTextarea();
		}
		//校验
		function check(){
			if(document.getElementById("jobInfo.post").value.length <1) {
				alert("请输入招聘职位");
				document.getElementById("jobInfo.post").focus();
				return false;
			}
			if(document.getElementById("jobInfo.workSpace").value.length <1) {
				alert("请输入工作地点");
				document.getElementById("jobInfo.workSpace").focus();
				return false;
			}
			
			if (!/^\d+$/.test(document.getElementById("jobInfo.staffCount").value))   
    					{   
       						alert("请输入正确的招聘人数!");
					document.getElementById("jobInfo.staffCount").focus();
					return false;
    					} 
			if(document.getElementById("jobInfo.type").value.length <1) {
				alert("请输入工作类型");
				document.getElementById("jobInfo.type").focus();
				return false;
			}
			if(document.getElementById("jobInfo.workExp").value.length <1) {
				alert("请输入要求工作经验");
				document.getElementById("jobInfo.workExp").focus();
				return false;
			}
			if(document.getElementById("jobInfo.education").value.length <1) {
				alert("请输入学历要求");
				document.getElementById("jobInfo.education").focus();
				return false;
			}
			
			if(document.getElementById("jobInfo.contact").value.length <1) {
				alert("请输入联系人");
				document.getElementById("jobInfo.contact").focus();
				return false;
			}
			if(document.getElementById("jobInfo.phone").value.length <1) {
				alert("请输入联系电话");
				document.getElementById("jobInfo.phone").focus();
				return false;
			}
			
		return true;
		
	}
	
		</script>
		<title>职位信息-添加</title>
	</head>
	<body>
		<form action="${pageContext.request.contextPath }/admin/addJobIno.htm"
			method="post" onsubmit="return check();">
			<table width="100%" cellspacing="0" cellpadding="0"
				bordercolor="#003366" border="1" class="Table1">
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td height="25" align="center">
						岗位：
					</td>
					<td height="25" align="center">
						<input type="text" id="jobInfo.post" name="jobInfo.post" value="${jobInfo.post }">
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td height="25" align="center">
						工作地点:
					</td>
					<td height="25" align="center">
						<input type="text" id="jobInfo.workSpace" name="jobInfo.workSpace" value="${jobInfo.workSpace }">
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td height="25" align="center">
						招聘人数:
					</td>
					<td height="25" align="center">
						<input type="text" id="jobInfo.staffCount" name="jobInfo.staffCount" value="${jobInfo.staffCount }">
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td height="25" align="center">
						工作类型:
					</td>
					<td height="25" align="center">
						<input type="text" id="jobInfo.type" name="jobInfo.type" value="${jobInfo.type }">
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td height="25" align="center">
						工作经验:
					</td>
					<td height="25" align="center">
						<input type="text" id="jobInfo.workExp"  name="jobInfo.workExp" value="${jobInfo.workExp }">
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td height="25" align="center">
						学历要求:
					</td>
					<td height="25" align="center">
						<input type="text" id="jobInfo.education" name="jobInfo.education" value="${jobInfo.education }">
					</td>
				</tr>

				<tr style="font-weight: bold; background: #EEEEEE;">
					<td height="100" align="center">
						职位描述:
					</td>
					<td height="25" align="center">
						<textarea rows="1" cols="1" id="jobInfo.describ" name="jobInfo.describ"></textarea>
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td height="25" align="center">
						招聘要求:
					</td>
					<td height="25" align="center">
						<textarea rows="1" cols="1" id="jobInfo.jobNeed" name="jobInfo.jobNeed"></textarea>
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td colspan="2" height="25" align="center">

						联系人:
						<input type="text" id="jobInfo.contact" name="jobInfo.contact" value="${jobInfo.contact }">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 联系电话:
						<input type="text" id="jobInfo.phone" name="jobInfo.phone" value="${jobInfo.phone }">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Email:
						<input type="text" id="jobInfo.email" name="jobInfo.email" value="${jobInfo.email }">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td colspan="2" height="25" align="center">
									&nbsp;
					</td>
				</tr>
				<tr style="font-weight: bold; background: #EEEEEE;">
					<td colspan="2" height="25" align="right">
					<br>
					<br>
					<br>
					<input type="hidden" name="jobInfo.nid" value="7">
					<input type="submit" value="提交" />
					<input type="button" onclick="javascript:history.go(-1)" value="返回" />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>